
const path = require('path')

// .vuepress/config.js
module.exports = {
  title: "文档", // 网站标题
  description: '文档', //网站描述
  base: '/', //  部署时的路径 默认 /  可以使用二级地址 /base/
  // lang: 'en-US', //语言
  head: [
    [
      'meta',
      {
        name: 'viewport',
        content:
          'width=device-width, initial-scale=1.0,maximum-scale=1.0,minimum=1.0,user-scalable=no,viewport-fit=cover',
      },
    ],
  ],
  // 主题配置
  themeConfig: {
    //   头部导航
    nav: [
      { text: '首页', link: '/' },
      { text: 'vue2', link: '/comp/installation' },
    //   {
    //     text: '关于',
    //     link: '/about/',
    //     items: [{ text: '详情', link: '/about/details/' }],
    //   },
    ],
    sidebarDepth: 1,
    //   侧边导航
    sidebar: {
        '/comp/': [
            {
                title: '组件安装',
                collapsable: false,
                path: '/comp/installation',
              },
              {
                title: '通用组件',
                collapsable: false,
                children:[
                  ['/comp/common/button', 'button 组件'],
                ]
              }
            ]
    }
  },
  plugins: [
    [
      'vuepress-plugin-typescript',
      {
        tsLoaderOptions: {
          // ts-loader 的所有配置项
        },
      },
    ],
  ],
  configureWebpack: {
    resolve: {
        alias: {
            '@lib': path.resolve(__dirname, '../../../packages/vue2/src/'),
            '@style': path.resolve(__dirname, '../../../packages/style/'),
           }
       }
   }
}